Use new-style `sort` signature in Lisp manual examples
authorMattias Engdegård <mattiase@acm.org>
Fri, 22 Mar 2024 14:08:50 +0000 (15:08 +0100)
committerMattias Engdegård <mattiase@acm.org>
Fri, 29 Mar 2024 10:39:38 +0000 (11:39 +0100)
* doc/lispref/help.texi (Accessing Documentation):
* doc/lispref/strings.texi (Text Comparison):
Use the new sort calling convention (bug#69709).

doc/lispref/help.texi
doc/lispref/strings.texi

index a76bac011b70705dedda552aaab306ea680cf8e5..4236fa75bf007c717f2524b12aacaed39aea49ed 100644 (file)
@@ -231,7 +231,7 @@ in the *Help* buffer."
     (help-setup-xref (list 'describe-symbols pattern)
                  (called-interactively-p 'interactive))
     (with-help-window (help-buffer)
-      (mapcar describe-func (sort sym-list 'string<)))))
+      (mapcar describe-func (sort sym-list)))))
 @end group
 @end smallexample
 
index 6a9dd589237fd619d3573c8eb0f33a0808f37e03..7f640255a7aa432d91972a1fbc7474b73dadb796 100644 (file)
@@ -692,7 +692,8 @@ for sorting (@pxref{Sequence Functions}):
 
 @example
 @group
-(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
+(sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
+       :lessp #'string-collate-lessp)
      @result{} ("11" "1 1" "1.1" "12" "1 2" "1.2")
 @end group
 @end example
@@ -709,8 +710,8 @@ systems.  The @var{locale} value of @code{"POSIX"} or @code{"C"} lets
 
 @example
 @group
-(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2")
-      (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX")))
+(sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
+      :lessp (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX")))
      @result{} ("1 1" "1 2" "1.1" "1.2" "11" "12")
 @end group
 @end example